The Equivalence Problem for LL- and LR-Regular Grammars
نویسنده
چکیده
Questions whether or not two grammars belonging to a family of grammars generate the same language have extensively been studied in the literature. These problems are called equivalence problems and if there exists an algorithm which for each pair of grammars of this family gives an answer to this question then the equivalence problem for this family of grammars is said to be decidable. Otherwise the problem is said to be undecidable. For example, the equivalence problem for the family of regular grammars is decidable. On the other hand, the equivalence problem for the family of context-free grammars is known to be undecidable. The equivalence problem ~s open for various classes of grammars which generate deterministic languages. For simple deterministic and LL(k) grammars the problem has been solved. In this paper we study the equivalence problem for the class of LLregular grammars and languages. The class of LL-regular grammars is obtained from the class of LL(k) grammars by allowing regular look-ahead instead of finite look-ahead, cf. Jarzabek and Krawczyk 18], Nijholt II0,11,12] and Poplawski ]16] for results on LL-regular grammars and languages. The class of LL(k) grammars is properly included in the class of LL-regular gra~m~ars and the class of LL(k) languages is properly included in the class of LL-regular languages. Contrary to the other families of languages which have been studied from the point of view of the equivalence problem, the class of LL-regular languages contains languages which are not deterministic. It will be shown that the equivalence problem for LL-regular grammars is decidable. Apart from extending the known result for LL(k) grammar equivalence to LLregular grammar equivalence, we obtain an alternative proof of the decidability of
منابع مشابه
The Equivalence Problem for LL - and L / ? - Regular Grammars
The equivalence problem for context-free grammars is “given two arbitrary grammars, do they generate the same language ?” Since this is undecidable in general attention has been restricted to decidable subclasses of the context-free grammars. For example, the classes of U(k) grammars and real-time strict deterministic grammars. In this paper it is shown that the equivalence problem for U-regula...
متن کاملTests for the LR-, LL-, and LC-Regular Conditions
Most of the linear time parsing strategies (e.g., LL(k) and U(k) type parsers) for context-free grammars operate by looking ahead on the input tape for a fixed number of symbols. The fixed length look-ahead strings partition the set of input strings into classes of strings which are equivalent with respect to parsing decisions. A moment’s thought shows that these look-ahead classes are regular ...
متن کاملThe Hierarchy of LR-Attributed Grammars
The problem of attribute evaluation during LR parsing is considered. Several definitions of LR-attributed grammars are presented. Relations of corresponding attribute grammar classes are analysed. Also the relations between LR-attributed grammars and LL-attributed grammars and between LR-attributed grammars and a class of one-pass attributed grammars based on left-corner grammars are considered.
متن کاملParsing with Pictures
The development of elegant and practical algorithms for parsing context-free languages is one of the major accomplishments of 20 century Computer Science. These algorithms are presented in the literature using string rewriting systems or abstract machines like pushdown automata, but the resulting descriptions are unsatisfactory for several reasons. First, even a basic understanding of parsing a...
متن کاملCh(k) Grammars: A Characterization of LL(k) Languages
From the point of view of parsing the LL(K] grammars constitute a very attractive class of context-free grammars. For each LL{K] grammar a top-down parsing algorithm can be devised which is essentially a one-state deterministic push-down automaton. From a more theoretiG point of view LL[K) grammars are attractive as well. It is well-known, for example, that it is decidable whether two LLfk) gra...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- J. Comput. Syst. Sci.
دوره 24 شماره
صفحات -
تاریخ انتشار 1981